home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / LgcyPlus / disk2 / STRIPRES._ / STRIPRES.
Encoding:
Text File  |  2001-03-02  |  1.2 KB  |  33 lines

  1. 10    ! *********************************************************
  2. 20    ! Example: STRIPCHART (Rescale)
  3. 30    !
  4. 40    ! This program builds a STRIPCHART widget. As the chart
  5. 50    ! scrolls, the vertical scale factor automatically changes
  6. 60    ! to accomodate the display values.
  7. 70    !
  8. 80    ! *********************************************************
  9. 90    !
  10. 100   INTEGER I
  11. 110   REAL D(1:4)
  12. 120   ASSIGN @Graph TO WIDGET "STRIPCHART"
  13. 130   CONTROL @Graph;SET ("TITLE":"Example: STRIPCHART (Rescale)")
  14. 140   CONTROL @Graph;SET ("X":50,"Y":25,"VISIBLE":0)
  15. 150   CONTROL @Graph;SET ("CURRENT AXIS":"X","ORIGIN":0,"RANGE":4)
  16. 160   CONTROL @Graph;SET ("NUMBER FORMAT":"MINUTES","DIGITS":9)
  17. 170   CONTROL @Graph;SET ("CURRENT AXIS":"Y","LOGARITHMIC":1,"ORIGIN":.01)
  18. 180   CONTROL @Graph;SET ("RANGE":4,"AUTOSCALE":1,"VISIBLE":1)
  19. 190   CONTROL @Graph;SET ("SYSTEM MENU":"Quit")
  20. 200   ON EVENT @Graph,"SYSTEM MENU" GOTO Finis
  21. 210   T=0
  22. 220   WHILE 1
  23. 230     T=T+.1
  24. 240     FOR I=1 TO 4
  25. 250       D(I)=EXP((-62+25*I+10*SIN(T*I*3)+T*(I-2.5))/12)
  26. 260     NEXT I
  27. 270     WAIT .05
  28. 280     CONTROL @Graph;SET ("POINT LOCATION":T,"VALUES":D(*))
  29. 290   END WHILE
  30. 300 Finis:   !
  31. 310   ASSIGN @Graph TO *          ! Delete STRIPCHART widget
  32. 320   END
  33.